package com.quasar.hpatient.model.medicalmodel;

import com.quasar.hpatient.utils.StringUtils;

import java.io.Serializable;
import java.util.List;

/**
 * 社区列表
 * Created by Administrator on 2017/8/10 0010.
 */

public class CommunityData implements Serializable {

    public final static String TYPE_URL = "1";
    public final static String TYPE_IMG = "2";


    public String type(){
        String  type="0";
        if(getContent()!=null){
            boolean isUrl= StringUtils.isUrl(getContent());
            if(isUrl){
                type=TYPE_URL;
            }
        }else{
            if(getCover()!=null){
                type=TYPE_IMG;
            }
        }
        return type;
    }



    public boolean hasFavort(){
        if(listPraise!=null && listPraise.size()>0){
            return true;
        }
        return false;
    }

    public boolean hasComment(){
        if(getListComment()!=null && getListComment().size()>0){
            return true;
        }
        return false;
    }


    //文字动态（折叠）
    private boolean isExpand;

    public void setExpand(boolean isExpand){
        this.isExpand = isExpand;
    }

    public boolean isExpand(){
        return this.isExpand;
    }

    private String cover;
    private String upTime;
    private int hit;
    private int anonymous;
    private Object doctorInfo;
    private int id;
    private int userType;
    private PatientInfoBean patientInfo;
    private int userId;
    private String content;
    private int upVote;
    private List<ListCommentBean> listComment;
    private List<ListPraiseBean> listPraise;

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getUpTime() {
        return upTime;
    }

    public void setUpTime(String upTime) {
        this.upTime = upTime;
    }

    public int getHit() {
        return hit;
    }

    public void setHit(int hit) {
        this.hit = hit;
    }

    public int getAnonymous() {
        return anonymous;
    }

    public void setAnonymous(int anonymous) {
        this.anonymous = anonymous;
    }

    public Object getDoctorInfo() {
        return doctorInfo;
    }

    public void setDoctorInfo(Object doctorInfo) {
        this.doctorInfo = doctorInfo;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserType() {
        return userType;
    }

    public void setUserType(int userType) {
        this.userType = userType;
    }

    public PatientInfoBean getPatientInfo() {
        return patientInfo;
    }

    public void setPatientInfo(PatientInfoBean patientInfo) {
        this.patientInfo = patientInfo;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getUpVote() {
        return upVote;
    }

    public void setUpVote(int upVote) {
        this.upVote = upVote;
    }

    public List<ListCommentBean> getListComment() {
        return listComment;
    }

    public void setListComment(List<ListCommentBean> listComment) {
        this.listComment = listComment;
    }

    public List<ListPraiseBean> getListPraise() {
        return listPraise;
    }

    public void setListPraise(List<ListPraiseBean> listPraise) {
        this.listPraise = listPraise;
    }

    public static class PatientInfoBean implements Serializable {
        /**
         * birthday :
         * realCover :
         * idCard :
         * bmobPassword :
         * remark :
         * bloodId : 0
         * cityId : 0
         * cover :
         * nick :
         * doctorName :
         * bmobUserName :
         * doctorId : 0
         * phoneEmerge :
         * lastedItTime :
         * id : 61
         * provenceId : 0
         * thirdType : 0
         * email :
         * height : 0
         * finger :
         * address :
         * doctorPatientRelative : {"relationType":0,"doctorId":0,"patientId":0,"id":61,"operationTime":""}
         * thirdId :
         * enRealName :
         * sex : 0
         * chatName :
         * drName :
         * weight : 0
         * token :
         * realName :
         * face :
         * createTime :
         * passwd :
         * phone :
         * regionId : 0
         * saltValue :
         * name :
         * patientOperationInfo : null
         * thirdToken :
         * usedName :
         * chatPasswd :
         * status : 0
         */

        private String birthday;
        private String realCover;
        private String idCard;
        private String bmobPassword;
        private String remark;
        private int bloodId;
        private int cityId;
        private String cover;
        private String nick;
        private String doctorName;
        private String bmobUserName;
        private int doctorId;
        private String phoneEmerge;
        private String lastedItTime;
        private int id;
        private int provenceId;
        private int thirdType;
        private String email;
        private int height;
        private String finger;
        private String address;
        private DoctorPatientRelativeBean doctorPatientRelative;
        private String thirdId;
        private String enRealName;
        private int sex;
        private String chatName;
        private String drName;
        private int weight;
        private String token;
        private String realName;
        private String face;
        private String createTime;
        private String passwd;
        private String phone;
        private int regionId;
        private String saltValue;
        private String name;
        private Object patientOperationInfo;
        private String thirdToken;
        private String usedName;
        private String chatPasswd;
        private int status;

        public String getBirthday() {
            return birthday;
        }

        public void setBirthday(String birthday) {
            this.birthday = birthday;
        }

        public String getRealCover() {
            return realCover;
        }

        public void setRealCover(String realCover) {
            this.realCover = realCover;
        }

        public String getIdCard() {
            return idCard;
        }

        public void setIdCard(String idCard) {
            this.idCard = idCard;
        }

        public String getBmobPassword() {
            return bmobPassword;
        }

        public void setBmobPassword(String bmobPassword) {
            this.bmobPassword = bmobPassword;
        }

        public String getRemark() {
            return remark;
        }

        public void setRemark(String remark) {
            this.remark = remark;
        }

        public int getBloodId() {
            return bloodId;
        }

        public void setBloodId(int bloodId) {
            this.bloodId = bloodId;
        }

        public int getCityId() {
            return cityId;
        }

        public void setCityId(int cityId) {
            this.cityId = cityId;
        }

        public String getCover() {
            return cover;
        }

        public void setCover(String cover) {
            this.cover = cover;
        }

        public String getNick() {
            return nick;
        }

        public void setNick(String nick) {
            this.nick = nick;
        }

        public String getDoctorName() {
            return doctorName;
        }

        public void setDoctorName(String doctorName) {
            this.doctorName = doctorName;
        }

        public String getBmobUserName() {
            return bmobUserName;
        }

        public void setBmobUserName(String bmobUserName) {
            this.bmobUserName = bmobUserName;
        }

        public int getDoctorId() {
            return doctorId;
        }

        public void setDoctorId(int doctorId) {
            this.doctorId = doctorId;
        }

        public String getPhoneEmerge() {
            return phoneEmerge;
        }

        public void setPhoneEmerge(String phoneEmerge) {
            this.phoneEmerge = phoneEmerge;
        }

        public String getLastedItTime() {
            return lastedItTime;
        }

        public void setLastedItTime(String lastedItTime) {
            this.lastedItTime = lastedItTime;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getProvenceId() {
            return provenceId;
        }

        public void setProvenceId(int provenceId) {
            this.provenceId = provenceId;
        }

        public int getThirdType() {
            return thirdType;
        }

        public void setThirdType(int thirdType) {
            this.thirdType = thirdType;
        }

        public String getEmail() {
            return email;
        }

        public void setEmail(String email) {
            this.email = email;
        }

        public int getHeight() {
            return height;
        }

        public void setHeight(int height) {
            this.height = height;
        }

        public String getFinger() {
            return finger;
        }

        public void setFinger(String finger) {
            this.finger = finger;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public DoctorPatientRelativeBean getDoctorPatientRelative() {
            return doctorPatientRelative;
        }

        public void setDoctorPatientRelative(DoctorPatientRelativeBean doctorPatientRelative) {
            this.doctorPatientRelative = doctorPatientRelative;
        }

        public String getThirdId() {
            return thirdId;
        }

        public void setThirdId(String thirdId) {
            this.thirdId = thirdId;
        }

        public String getEnRealName() {
            return enRealName;
        }

        public void setEnRealName(String enRealName) {
            this.enRealName = enRealName;
        }

        public int getSex() {
            return sex;
        }

        public void setSex(int sex) {
            this.sex = sex;
        }

        public String getChatName() {
            return chatName;
        }

        public void setChatName(String chatName) {
            this.chatName = chatName;
        }

        public String getDrName() {
            return drName;
        }

        public void setDrName(String drName) {
            this.drName = drName;
        }

        public int getWeight() {
            return weight;
        }

        public void setWeight(int weight) {
            this.weight = weight;
        }

        public String getToken() {
            return token;
        }

        public void setToken(String token) {
            this.token = token;
        }

        public String getRealName() {
            return realName;
        }

        public void setRealName(String realName) {
            this.realName = realName;
        }

        public String getFace() {
            return face;
        }

        public void setFace(String face) {
            this.face = face;
        }

        public String getCreateTime() {
            return createTime;
        }

        public void setCreateTime(String createTime) {
            this.createTime = createTime;
        }

        public String getPasswd() {
            return passwd;
        }

        public void setPasswd(String passwd) {
            this.passwd = passwd;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public int getRegionId() {
            return regionId;
        }

        public void setRegionId(int regionId) {
            this.regionId = regionId;
        }

        public String getSaltValue() {
            return saltValue;
        }

        public void setSaltValue(String saltValue) {
            this.saltValue = saltValue;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Object getPatientOperationInfo() {
            return patientOperationInfo;
        }

        public void setPatientOperationInfo(Object patientOperationInfo) {
            this.patientOperationInfo = patientOperationInfo;
        }

        public String getThirdToken() {
            return thirdToken;
        }

        public void setThirdToken(String thirdToken) {
            this.thirdToken = thirdToken;
        }

        public String getUsedName() {
            return usedName;
        }

        public void setUsedName(String usedName) {
            this.usedName = usedName;
        }

        public String getChatPasswd() {
            return chatPasswd;
        }

        public void setChatPasswd(String chatPasswd) {
            this.chatPasswd = chatPasswd;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public static class DoctorPatientRelativeBean implements Serializable {
            /**
             * relationType : 0
             * doctorId : 0
             * patientId : 0
             * id : 61
             * operationTime :
             */

            private int relationType;
            private int doctorId;
            private int patientId;
            private int id;
            private String operationTime;

            public int getRelationType() {
                return relationType;
            }

            public void setRelationType(int relationType) {
                this.relationType = relationType;
            }

            public int getDoctorId() {
                return doctorId;
            }

            public void setDoctorId(int doctorId) {
                this.doctorId = doctorId;
            }

            public int getPatientId() {
                return patientId;
            }

            public void setPatientId(int patientId) {
                this.patientId = patientId;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getOperationTime() {
                return operationTime;
            }

            public void setOperationTime(String operationTime) {
                this.operationTime = operationTime;
            }
        }
    }

    public static class ListCommentBean implements Serializable {
        public String getNick() {
            return nick;
        }

        public void setNick(String nick) {
            this.nick = nick;
        }

        /**
         * name : 徐
         * comment : 0000000000000000000000000000000000000000000000000000000000000000000
         * noteId : 0
         * id : 0
         * userType : 0
         * commentTime : 2017-08-17 21:43:41
         * userId : 0
         */

        private String nick;
        private String comment;
        private int noteId;
        private int id;
        private int userType;
        private String commentTime;
        private int userId;//记录帖子的id

        public String getPostId() {
            return postId;
        }

        public void setPostId(String postId) {
            this.postId = postId;
        }

        private String postId;


        public String getComment() {
            return comment;
        }

        public void setComment(String comment) {
            this.comment = comment;
        }

        public int getNoteId() {
            return noteId;
        }

        public void setNoteId(int noteId) {
            this.noteId = noteId;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getUserType() {
            return userType;
        }

        public void setUserType(int userType) {
            this.userType = userType;
        }

        public String getCommentTime() {
            return commentTime;
        }

        public void setCommentTime(String commentTime) {
            this.commentTime = commentTime;
        }

        public int getUserId() {
            return userId;
        }

        public void setUserId(int userId) {
            this.userId = userId;
        }
    }

    public static class ListPraiseBean implements Serializable {
        /**
         * birthday :
         * realCover :
         * idCard :
         * bmobPassword :
         * remark :
         * bloodId : 0
         * cityId : 0
         * cover : patient/2017-08-16/59942cef1103e.jpg
         * nick : sdfds
         * doctorName :
         * bmobUserName :
         * doctorId : 0
         * phoneEmerge :
         * lastedItTime :
         * id : 1
         * provenceId : 0
         * thirdType : 0
         * email :
         * height : 0
         * finger :
         * address :
         * doctorPatientRelative : {"relationType":0,"doctorId":0,"patientId":0,"id":1,"operationTime":""}
         * thirdId :
         * enRealName :
         * sex : 0
         * chatName :
         * drName :
         * weight : 0
         * token :
         * realName :
         * face :
         * createTime :
         * passwd :
         * phone :
         * regionId : 0
         * saltValue :
         * name :
         * patientOperationInfo : null
         * thirdToken :
         * usedName :
         * chatPasswd :
         * status : 0
         */

        private String birthday;
        private String realCover;
        private String idCard;
        private String bmobPassword;
        private String remark;
        private int bloodId;
        private int cityId;
        private String cover;
        private String nick;
        private String doctorName;
        private String bmobUserName;
        private int doctorId;
        private String phoneEmerge;
        private String lastedItTime;
        private int id;
        private int provenceId;
        private int thirdType;
        private String email;
        private int height;
        private String finger;
        private String address;
        private DoctorPatientRelativeBeanX doctorPatientRelative;
        private String thirdId;
        private String enRealName;
        private int sex;
        private String chatName;
        private String drName;
        private int weight;
        private String token;
        private String realName;
        private String face;
        private String createTime;
        private String passwd;
        private String phone;
        private int regionId;
        private String saltValue;
        private String name;
        private Object patientOperationInfo;
        private String thirdToken;
        private String usedName;
        private String chatPasswd;
        private int status;

        public String getBirthday() {
            return birthday;
        }

        public void setBirthday(String birthday) {
            this.birthday = birthday;
        }

        public String getRealCover() {
            return realCover;
        }

        public void setRealCover(String realCover) {
            this.realCover = realCover;
        }

        public String getIdCard() {
            return idCard;
        }

        public void setIdCard(String idCard) {
            this.idCard = idCard;
        }

        public String getBmobPassword() {
            return bmobPassword;
        }

        public void setBmobPassword(String bmobPassword) {
            this.bmobPassword = bmobPassword;
        }

        public String getRemark() {
            return remark;
        }

        public void setRemark(String remark) {
            this.remark = remark;
        }

        public int getBloodId() {
            return bloodId;
        }

        public void setBloodId(int bloodId) {
            this.bloodId = bloodId;
        }

        public int getCityId() {
            return cityId;
        }

        public void setCityId(int cityId) {
            this.cityId = cityId;
        }

        public String getCover() {
            return cover;
        }

        public void setCover(String cover) {
            this.cover = cover;
        }

        public String getNick() {
            return nick;
        }

        public void setNick(String nick) {
            this.nick = nick;
        }

        public String getDoctorName() {
            return doctorName;
        }

        public void setDoctorName(String doctorName) {
            this.doctorName = doctorName;
        }

        public String getBmobUserName() {
            return bmobUserName;
        }

        public void setBmobUserName(String bmobUserName) {
            this.bmobUserName = bmobUserName;
        }

        public int getDoctorId() {
            return doctorId;
        }

        public void setDoctorId(int doctorId) {
            this.doctorId = doctorId;
        }

        public String getPhoneEmerge() {
            return phoneEmerge;
        }

        public void setPhoneEmerge(String phoneEmerge) {
            this.phoneEmerge = phoneEmerge;
        }

        public String getLastedItTime() {
            return lastedItTime;
        }

        public void setLastedItTime(String lastedItTime) {
            this.lastedItTime = lastedItTime;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getProvenceId() {
            return provenceId;
        }

        public void setProvenceId(int provenceId) {
            this.provenceId = provenceId;
        }

        public int getThirdType() {
            return thirdType;
        }

        public void setThirdType(int thirdType) {
            this.thirdType = thirdType;
        }

        public String getEmail() {
            return email;
        }

        public void setEmail(String email) {
            this.email = email;
        }

        public int getHeight() {
            return height;
        }

        public void setHeight(int height) {
            this.height = height;
        }

        public String getFinger() {
            return finger;
        }

        public void setFinger(String finger) {
            this.finger = finger;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public DoctorPatientRelativeBeanX getDoctorPatientRelative() {
            return doctorPatientRelative;
        }

        public void setDoctorPatientRelative(DoctorPatientRelativeBeanX doctorPatientRelative) {
            this.doctorPatientRelative = doctorPatientRelative;
        }

        public String getThirdId() {
            return thirdId;
        }

        public void setThirdId(String thirdId) {
            this.thirdId = thirdId;
        }

        public String getEnRealName() {
            return enRealName;
        }

        public void setEnRealName(String enRealName) {
            this.enRealName = enRealName;
        }

        public int getSex() {
            return sex;
        }

        public void setSex(int sex) {
            this.sex = sex;
        }

        public String getChatName() {
            return chatName;
        }

        public void setChatName(String chatName) {
            this.chatName = chatName;
        }

        public String getDrName() {
            return drName;
        }

        public void setDrName(String drName) {
            this.drName = drName;
        }

        public int getWeight() {
            return weight;
        }

        public void setWeight(int weight) {
            this.weight = weight;
        }

        public String getToken() {
            return token;
        }

        public void setToken(String token) {
            this.token = token;
        }

        public String getRealName() {
            return realName;
        }

        public void setRealName(String realName) {
            this.realName = realName;
        }

        public String getFace() {
            return face;
        }

        public void setFace(String face) {
            this.face = face;
        }

        public String getCreateTime() {
            return createTime;
        }

        public void setCreateTime(String createTime) {
            this.createTime = createTime;
        }

        public String getPasswd() {
            return passwd;
        }

        public void setPasswd(String passwd) {
            this.passwd = passwd;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public int getRegionId() {
            return regionId;
        }

        public void setRegionId(int regionId) {
            this.regionId = regionId;
        }

        public String getSaltValue() {
            return saltValue;
        }

        public void setSaltValue(String saltValue) {
            this.saltValue = saltValue;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Object getPatientOperationInfo() {
            return patientOperationInfo;
        }

        public void setPatientOperationInfo(Object patientOperationInfo) {
            this.patientOperationInfo = patientOperationInfo;
        }

        public String getThirdToken() {
            return thirdToken;
        }

        public void setThirdToken(String thirdToken) {
            this.thirdToken = thirdToken;
        }

        public String getUsedName() {
            return usedName;
        }

        public void setUsedName(String usedName) {
            this.usedName = usedName;
        }

        public String getChatPasswd() {
            return chatPasswd;
        }

        public void setChatPasswd(String chatPasswd) {
            this.chatPasswd = chatPasswd;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public static class DoctorPatientRelativeBeanX implements Serializable {
            /**
             * relationType : 0
             * doctorId : 0
             * patientId : 0
             * id : 1
             * operationTime :
             */

            private int relationType;
            private int doctorId;
            private int patientId;
            private int id;
            private String operationTime;

            public int getRelationType() {
                return relationType;
            }

            public void setRelationType(int relationType) {
                this.relationType = relationType;
            }

            public int getDoctorId() {
                return doctorId;
            }

            public void setDoctorId(int doctorId) {
                this.doctorId = doctorId;
            }

            public int getPatientId() {
                return patientId;
            }

            public void setPatientId(int patientId) {
                this.patientId = patientId;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getOperationTime() {
                return operationTime;
            }

            public void setOperationTime(String operationTime) {
                this.operationTime = operationTime;
            }
        }
    }

}
